{include file="public/header"}
<!-- 表单 -->
<style>
    .layui-form-label {
        width: 100px;
    }

    .layui-input-block {
        margin-left: 130px;
    }

    .layui-form-item {
        margin-right: 30%;
    }

    .layui-upload-img {
        width: 100px;
        height: 100px;
        line-height: 100px;
        text-align: center;
        border: 1px solid #ccc;
    }

    .layui-upload-img img {
        max-width: 100%;
        max-height: 100%;
        margin: auto auto;
    }
</style>
</head>

<body>
    <div class="cBody">
        <form id="addForm" class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">头像上传</label>
                <div class="layui-input-inline" style="width: 120px;">
                    <div class="layui-upload-img">
                        <img src="{$find.head_portrait}" id="fileslist">
                    </div>
                    <input type="hidden" name="head_portrait" autocomplete="off" class="layui-input fileslist"
                        value="{$find.head_portrait}">
                </div>
                <a href="javascript:;" class="layui-btn layui-btn-primary"
                    onclick="OpenView('{:url('Login/uploads')}?num=1&id=fileslist','文件上传')">文件上传</a>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">昵称</label>
                <div class="layui-input-block">
                    <input type="text" name="nickname" autocomplete="off" class="layui-input" value="{$find.nickname}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">手机号</label>
                <div class="layui-input-block">
                    <input type="text" name="mobile" autocomplete="off" class="layui-input" value="{$find.mobile}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">修改密码</label>
                <div class="layui-input-block">
                    <input type="password" name="updatepwd" autocomplete="off" class="layui-input" value="">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">邮箱</label>
                <div class="layui-input-block">
                    <input type="text" name="email" autocomplete="off" class="layui-input" value="{$find.email}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">性别</label>
                <div class="layui-input-block">
                    <input type="radio" name="sex" value="0" title="保密" {$find.sex=='0' ?"checked":""}>
                    <input type="radio" name="sex" value="1" title="男" {$find.sex=='1' ?"checked":""}>
                    <input type="radio" name="sex" value="2" title="女" {$find.sex=='2' ?"checked":""}>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">消费积分</label>
                <div class="layui-input-block">
                    <input type="number" name="pay_points" autocomplete="off" class="layui-input"
                        value="{$find.pay_points}" onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                        onpaste="this.value=this.value.replace(/[^\d]/g,'')">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">黑名单</label>
                <div class="layui-input-block">
                    <input type="radio" name="is_black" value="0" title="否" {$find.is_black=='0' ?"checked":""}>
                    <input type="radio" name="is_black" value="1" title="是" {$find.is_black=='1' ?"checked":""}>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="submitBut">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>

        <script>
            //表单提交
            layui.use(['form', 'layer'], function () {
                var form = layui.form;
                var layer = layui.layer;
                form.render();
                //监听提交
                form.on('submit(submitBut)', function (data) {
                    ajax_submit(data.field, '');
                    return false;
                });
            });
        </script>
    </div>
</body>
{include file="public/footer"}